package com.i2863.tools.weixinmp.util;

import java.util.concurrent.TimeUnit;

/**
 * Created by Administrator on 2016/9/2.
 */
public class ThreadUtil {
    public static void sleep(int n,TimeUnit unit){
        try {
            Thread.sleep(unit.toMillis(n));
        } catch (InterruptedException e) {
            e.printStackTrace();
        }
    }
    public static void sleep(int milliSeconds){
        sleep(milliSeconds,TimeUnit.MILLISECONDS);
    }
    public static void sleepSecond(int seconds){
        sleep(seconds,TimeUnit.SECONDS);
    }
    public static void sleepMin(int minutes){
        sleep(minutes,TimeUnit.MINUTES);
    }
    public static void sleepHour(int hours){
        sleep(hours,TimeUnit.HOURS);
    }
}
